This invention relates to data processing systems and, more particularly, to memory reclamation in object oriented databases.
There are al least two known approaches to memory reclamation, i.e., xe2x80x9cgarbage collectionxe2x80x9d, in data processing systems employing object oriented databases, namely, copying collector based, and mark and sweep based processes. The copying collector process traverses an entire object graph used in the system and copies so-called xe2x80x9clivexe2x80x9d objects into a new memory space and, then, the entire xe2x80x9coldxe2x80x9d memory space is reclaimed. In contrast the mark and sweep process marks all live objects by traversing the entire object graph and, then, traverses, i.e., sweeps, the entire database and deletes all objects that are not marked. With both of the above noted processes, the cost of traversing the entire object graph can be prohibitively expensive for databases larger than the memory size, particularly if there are many cross-page references.
One attempt at overcoming problems and limitations of prior known garbage collection processes is the use of a so-called xe2x80x9creference countingxe2x80x9d process. Reference counting is based on the concept of keeping a count of the number of pointers pointing to an object. When the reference count of an object is zero, the object is defined as being garbage and eligible for collection. One such reference counting process is described in an article entitled xe2x80x9cGarbage Collection in Object Oriented Databases Using Transactional Cyclic Reference Countingxe2x80x9d, Proceedings of the International Conference on Very Large Databases, Athens, Greece, August 1997, pages 366-375.
This prior reference counting process, however, relies on the assumptions that strict two phase locking (2PL) and strict write ahead logging (WAL) are employed, and that every strong pointer is followed to an object. Use of such assumptions caused significant inefficiencies in this prior known reference counting process.
Problems and limitations with prior known reference counting garbage collection processes are addressed in a reference counting process in which only the xe2x80x9clastxe2x80x9d detected strong pointer is followed to an object.
Moreover, no assumptions are made about the phase locking used in the transaction and strict WAL is not followed. Indeed, a relatively restricted local traversal of the object graph is employed which leads to higher efficiency.
Furthermore, in a client-server arrangement, updates made by a transaction running at the client may be reflected at the server after the transaction ends, and the updates are not required to be forced to the server before the end of the transaction.